using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 破甲Buff数据
/// </summary>
[CreateAssetMenu(menuName = "创建ScriptableObject/BuffData/ArmorShred")]
public class ArmorShredData : BuffData
{
    [Header("破甲效果设置")]
    [Tooltip("防御力降低百分比")]
    [Range(0.0f, 1.0f)]
    public float DefenseReduction = 0.4f;
    
    [Tooltip("是否可以被净化")]
    public bool CanBeCleansed = true;
    
    [Tooltip("是否可以被免疫")]
    public bool CanBeImmune = true;

    private void OnValidate()
    {
        // 确保BuffType正确设置
        if (BuffType != BuffType.ArmorShred)
        {
            BuffType = BuffType.ArmorShred;
        }
        
        // 设置默认标签
        if (Tags == BuffTag.None)
        {
            Tags = BuffTag.Debuff | BuffTag.Physical;
        }
    }
}